<style>
    #obj-add {
        padding: 20px 25px 25px 0;
    }
    #obj-add .layui-treeSelect .ztree li a, .ztree li span {
        margin: 0 0 2px 3px !important;
    }
</style>
<div class="layui-fluid" id="obj-add">
    <form class="layui-form" action="" lay-filter="obj-add-form">
                        <div class="layui-form-item">
                    <label class="layui-form-label">：</label>
                    <div class="layui-input-block">
                        <input type="text" name="fileName" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">：</label>
                    <div class="layui-input-block">
                        <input type="text" name="realName" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">：</label>
                    <div class="layui-input-block">
                        <input type="text" name="fileType" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">：</label>
                    <div class="layui-input-block">
                        <input type="text" name="createTime" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">：</label>
                    <div class="layui-input-block">
                        <input type="text" name="filePath" class="layui-input">
                    </div>
                </div>

        <div class="layui-form-item febs-hide">
            <button class="layui-btn" lay-submit="" lay-filter="obj-add-form-submit" id="submit"></button>
            <button type="reset" class="layui-btn" id="reset"></button>
        </div>
    </form>
</div>

<script>
    layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect'], function () {
        var $ = layui.$,
            febs = layui.febs,
            layer = layui.layer,
            formSelects = layui.formSelects,
            treeSelect = layui.treeSelect,
            form = layui.form,
            $view = $('#obj-add'),
            validate = layui.validate;

        form.verify(validate);
        form.render();

        formSelects.render();


        form.on('submit(obj-add-form-submit)', function (data) {
            febs.post(ctx + 'file', data.field, function () {
                layer.closeAll();
                febs.alert.success('新增成功');
                $('#febs-obj').find('#query').click();
            });
            return false;
        });
    });
</script>